//
//  WYFeatureCell.m
//  网易彩票
//
//  Created by 李江波 on 16/9/30.
//  Copyright © 2016年 lijiangbo. All rights reserved.
//

#import "WYFeatureCell.h"

@interface WYFeatureCell ()

@property (weak, nonatomic) IBOutlet UIImageView *backGround;

@end

@implementation WYFeatureCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}


-(void)setModel:(NSString *)model{

    _model = model;
    
    _backGround.image = [UIImage imageNamed:model];

    if ([model isEqualToString:@"guide_40_4"]) {
        
        UIButton *btn = [[UIButton alloc]init];
        
        [btn setImage:[UIImage imageNamed:@"icon_next"] forState:UIControlStateNormal];
        
        [self.contentView addSubview:btn];
        
        [btn addTarget:self action:@selector(clickMain) forControlEvents:UIControlEventTouchUpInside];
        
        [btn mas_makeConstraints:^(MASConstraintMaker *make) {
            
            make.centerX.equalTo(self.contentView);
            make.bottom.equalTo(self.contentView).offset(-90);
            make.width.offset(101);
            make.height.offset(32.5);
            
        }];
    }

}

-(void)clickMain{

    if (_clickMainBlock ) {
        
        
        _clickMainBlock();
    }
  

}

@end
